﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Cofe.Core.Property;

namespace Cofe.Core.Interfaces
{
    /// <summary>    
    /// Given a list of path parsers (from it's manager), call the actual parsing code, and return the parsed entry.
    /// e.g. ParseOnly, ParseAndAddToDatabase
    /// </summary>
    public interface IPathParseBehaviorManager : ICofeService
    {        
        Task<IPropertyHost> TryParsePathAsync(string path,
            ParsableType type = ParsableType.AutoDetect,
            EntryConstructionFlags flags = EntryConstructionFlags.Default);

        Task<IPropertyHost> ParsePathAsync(string path,
            ParsableType type = ParsableType.AutoDetect,
            EntryConstructionFlags flags = EntryConstructionFlags.Default);

        IPropertyHost TryParsePath(string path,
            ParsableType type = ParsableType.AutoDetect,
            EntryConstructionFlags flags = EntryConstructionFlags.Default);

        IPropertyHost ParsePath(string path,
            ParsableType type = ParsableType.AutoDetect,
            EntryConstructionFlags flags = EntryConstructionFlags.Default);

        Task<bool> ExistsAsync(string fullParsePath, ParsableType type);         
    }
}
